import {StrictMode} from 'react'
import {createRoot} from 'react-dom/client'
import './index.css'
import {createBrowserRouter, RouterProvider} from "react-router-dom";
import {Root} from "./routes/Root.tsx";
import {ErrorPage} from "./routes/ErrorPage.tsx";
import {TaskOrder} from "./routes/TaskOrder";
import {PersonCalendar} from "./routes/PersonCalendar";

const router = createBrowserRouter([
    {
        path: "/",
        element: <Root/>,
        errorElement: <ErrorPage/>,
        children: [
            {
                path: "/task_order",
                element: <TaskOrder/>,
            },
            {
                path: "/person_calendar",
                element: <PersonCalendar/>,
            },
        ]
    },
]);

createRoot(document.getElementById('root')!).render(
    <StrictMode>
        <RouterProvider router={router}/>
    </StrictMode>,
)
